# $Id: Makefile.in,v 1.298 2008/11/05 05:20:46 djm Exp $

# uncomment if you run a non bourne compatable shell. Ie. csh
#SHELL = @SH@

AUTORECONF=autoreconf

prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
sbindir=@sbindir@
libexecdir=@libexecdir@
datadir=@datadir@
datarootdir=@datarootdir@
mandir=@mandir@
mansubdir=@mansubdir@
sysconfdir=@sysconfdir@
piddir=@piddir@
srcdir=@srcdir@
top_srcdir=@top_srcdir@

DESTDIR=
VPATH=@srcdir@
STRIP_OPT=@STRIP_OPT@

CC=@CC@
LD=@LD@
CFLAGS=@CFLAGS@
CPPFLAGS=-I$(srcdir) @CPPFLAGS@ @DEFS@
#LIBS=@LIBS@
AR=@AR@
AWK=@AWK@
RANLIB=@RANLIB@
INSTALL=@INSTALL@
PERL=@PERL@
SED=@SED@
ENT=@ENT@
XAUTH_PATH=@XAUTH_PATH@
LDFLAGS= @LDFLAGS@ -L. $(STATIC)
EXEEXT=@EXEEXT@


TARGETS=$(LIBCOMPAT) libopenssh.a

LIBSSH_OBJS=strlcpy.o strlcat.o bsd-snprintf.o bsd-asprintf.o sha2.o\
	bufaux.o bufbn.o buffer.o freezero.o \
	cipher.o cipher-aes.o reallocarray.o \
	cipher-bf1.o cipher-ctr.o cipher-3des1.o cleanup.o \
	compat.o crc32.o fatal.o \
	log.o match.o md-sha256.o moduli.o packet.o \
	rsa.o xmalloc.o key.o kex.o mac.o hmac.o misc.o \
	rijndael.o ssh-dss.o ssh-rsa.o dh.o kexdh.o \
	kexgex.o kexdhc.o kexgexc.o umac.o umac128.o sshconnect2.o \
	sshbuf.o ssherr.o addrmatch.o sshbuf-getput-basic.o \
	vis.o bsd-misc.o digest-libc.o digest-openssl.o \
	explicit_bzero.o strtonum.o kexecdh.o kexecdhc.o arc4random.o \
	cipher-chachapoly.o chacha.o poly1305.o \
	timingsafe_bcmp.o sshbuf-getput-crypto.o kexc25519c.o kexc25519.o \
	sshkey.o sshbuf-misc.o bcrypt_pbkdf.o ssh-ed25519.o \
	blowfish.o hash.o uuencode.o blocks.o ssh-ecdsa.o base64.o \
	ed25519.o sc25519.o ge25519.o fe25519.o verify.o opacket.o \
	smult_curve25519_ref.o # recallocarray.o \

# recallocarray is not needed 


all: $(TARGETS)

$(LIBSSH_OBJS): Makefile.in config.h

.c.o:
	$(CC) $(CFLAGS) $(CPPFLAGS) -c $<


libopenssh.a: $(LIBSSH_OBJS)
	$(AR) cr $@ $(LIBSSH_OBJS)
	$(RANLIB) $@


# fake rule to stop make trying to compile moduli.o into a binary "moduli.o"
moduli:
	echo


# special case target for umac128
umac128.o:	umac.c
	$(CC) $(CFLAGS) $(CPPFLAGS) -o umac128.o -c $(srcdir)/umac.c \
	    -DUMAC_OUTPUT_LEN=16 -Dumac_new=umac128_new \
	    -Dumac_update=umac128_update -Dumac_final=umac128_final \
	    -Dumac_delete=umac128_delete

clean:
	rm -f *.o *.a $(TARGETS) config.cache config.log
	rm -f *.out core

veryclean: distclean
	rm -f configure config.h.in *.0

